package com.ftg.learn.springboot.product.mapper;

import com.ftg.learn.springboot.product.pojo.product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ProductMapper {

	@Select("SELECT * FROM product p LEFT JOIN brand b ON p.bid = b.`bid` WHERE b.`bid` = #{bid} ORDER BY coopdate DESC LIMIT 6")
	List<product> showAll(String bid);
}